$(function () {
	// 获取阶段信息
	var ajax = new $ax("/api/sdstool/getTreatDetailInfo", function (data) {
		var l = data.length;
		var items = new Array(l);
		for (let i = 0; i < data.length; i++) {
			var item = {};
			var scheme= data[i];
			var schemeName = scheme.schemeName;
			var schemeDetail = scheme.schemeDetail;
			item.title = schemeName;
			var contextStr = "";
			for (let j = 0; j < schemeDetail.length; j++) {
				var schemeItem = schemeDetail[j];
				var itemResult = schemeItem.itemResult;
				contextStr += "<div style='margin-top: 5px;'>" + (itemResult==1?"✔️":"❌") + schemeItem.itemName + "</div>";
			}
			item.context = contextStr;
			items[i] = item;
		}

		$("#hstp").hstep({
			stepWidth:240,
			currentInd: l,
			items: items
		});
	}, function (data) {
	});
	var params = {};
	params.patientId = $('#patientId').val();
	params.entityId = $('#entityId').val();
	ajax.set(params);
	ajax.start();
});
